package com.swust.exam.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.swust.exam.dao.ScoreMapper;
import com.swust.exam.pojo.Score;

@Service
public class ScoreService {
	@Autowired
	private ScoreMapper scoreMapper;
	
	public Score get(int id){
		return scoreMapper.selectByPrimaryKey(id);
	} 
	
	public int delete(int id) {
		return scoreMapper.deleteByPrimaryKey(id);
	}
	
	public int insert(Score score) {
		return scoreMapper.insert(score);
	}
	
	public int update(Score score) {
		return scoreMapper.updateByPrimaryKey(score);
	}

}
